package com.shop.flowershopmanager.service;

import com.shop.flowershopmanager.dao.FlowersDao;
import com.shop.flowershopmanager.entity.Flowers;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Service
public class FlowersImpl implements FlowersService{

    @Resource
    private FlowersDao flowersDao;

    @Override
    @Transactional(propagation = Propagation.SUPPORTS)
    public List<Flowers> getFlowers(String fName,String origin,String cName) {
        return flowersDao.getFlowers(fName,origin,cName);
    }
}
